﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
    <link href="https://cdn.bootcss.com/amazeui/2.7.2/css/amazeui.css" rel="stylesheet">
    <link href="css/common.css" rel="stylesheet" />
    <style>
        .am-slider-default .am-control-nav {
            bottom: 10px;
        }

        .am-slider-a1 .am-control-nav li a {
            background-color: #aeaeae;
        }

            .am-slider-a1 .am-control-nav li a.am-active {
                background-color: #46e0ae;
            }

        .head {
            position: relative;
            width: 100%;
        }

        .head_d1 {
            background: #fff;
            padding: 2% 2%;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .head_img01 {
            width: 35%;
            display: block;
            float: left;
            margin-top: 6%;
        }

        .head_span01 {
            display: block;
            float: left;
            margin-right: 2%;
            font-size: 1.6rem;
        }

        .search::-webkit-input-placeholder {
            color: #c8c8c8;
        }

        .am-btn-default:active, .am-btn-default.am-active, .am-dropdown.am-active .am-btn-default.am-dropdown-toggle {
            background: rgba(0,0,0,0);
        }

        .am-selected-btn.am-btn-default {
            padding: 0;
            border: none;
        }

        .am-selected {
            width: 100%;
        }

        .am-selected-status {
            text-align: center;
        }

        .head_img02 {
            width: 60%;
            display: block;
            margin: 0 auto;
        }

        .head_span03 {
            font-weight: 500;
            font-size: 1.7rem;
        }

        .line {
            border: 3px solid #f6f6f6;
        }

        .main {
            width: 100%;
            position: relative;
        }

        .newactivty {
            width: 100%;
            overflow: hidden;
            padding: 3% 0;
        }

        .newacty_d1 {
            width: 100%;
            position: relative;
            padding-right: 3%;
            overflow: hidden;
            border-bottom: 1px solid #f2f2f2;
            padding-bottom: 2%;
        }

        .newactyd1_d1 {
            position: absolute;
            right: 3%;
            top: 10%;
        }

        .newacty_sp1 {
            display: block;
            padding: 1% 8%;
            text-align: right;
            background: linear-gradient(to right, #ff68a1,#ff3c74);
            border-radius: 50px;
            color: #fff;
            margin-left: -11%;
            width: 41%;
            position: relative;
        }

        .newacty_d2 {
            padding: 2% 4%;
        }

        .newactyd1_d1 {
            overflow: hidden;
            border-radius: 5px;
        }

        .newactyd2_img01 {
            width: 100%;
        }

        .am-list-news-default .am-list .am-list-item-desced .am-list-item-text {
            margin-top: 0.2rem;
        }

        .am-list > li {
            border-top: none;
            border-bottom: 1px solid #dedede;
        }

        .match {
            width: 100%;
            margin-top: -5%;
        }

        .match_d1 {
            width: 100%;
            overflow: hidden;
            margin-bottom: 3%;
            position: relative;
        }

        .matchd1_img01 {
            width: 100%;
            height: 16rem;
            display: block;
        }

        a {
            color: #000;
        }

        .searchbtn {
            position: absolute;
            top: 0;
            right: 0;
            border-radius: 50px;
            border: none;
            display: none;
        }

        .logoimg {
            width: 20%;
            max-width: 40px;
            max-height: 40px;
            margin-right: 2%;
        }

            .logoimg img {
                width: 100%;
                display: block;
            }

        .slides-cont {
            background: rgba(0,0,0,0.4);
            padding: 1% 2%;
            color: #fff;
            width: 100%;
            position: absolute;
            bottom: 0;
        }

        .searchmodule {
            position: fixed;
            top: 0;
            width: 100%;
            height: 100%;
            overflow-y: auto;
            background: #fff;
            z-index: 999999999999;
            display: none;
        }
    </style>

</head>
<body>
    <div class="page" id="page" v-cloak>
        <div class="head">

            <div class="am-g head_d1">
                <div class="am-u-sm-2" style="padding: 0;">
                </div>
                <div class="am-u-sm-8" style="display: flex;justify-content: center;align-items: center">
                    <div class="logoimg"><img src="images/logo.png" alt=""></div><span>飞羽体育</span>
                </div>
                <div class="am-u-sm-2 searchIcon">
                    <div style="width: 50%;display: block;margin: 0 auto;">
                        <span class="am-icon am-icon-search" style="display: flex;justify-content: center;color: #6e6f71;"></span>
                    </div>
                </div>
            </div>


            <!--<div class="am-g head_d1">
                <div class="am-u-sm-2" style="padding: 0;">
                </div>
                <div class="am-u-sm-8" style="display: flex;justify-content: center;align-items: center">
                    <div class="logoimg"><img src="images/vipcard_logo.png" alt=""></div><span>飞羽体育</span>
                </div>
                <div class="am-u-sm-2 searchIcon">
                    <div style="width: 50%;display: block;margin: 0 auto;">
                        <span class="am-icon am-icon-search" style="display: flex;justify-content: center;color: #6e6f71;"></span>
                    </div>
                </div>
            </div>-->

            <div data-am-widget="slider" class="am-slider am-slider-a1" data-am-slider='{"directionNav":false}'>
                <ul class="am-slides">
                    <li v-for="list in carousel" v-on:click="Actclick(list.o.gId)" style="height:200px;">
                        <img v-bind:src="list.Img" style="height:200px;">
                        <span class="slides-cont">{{list.o.Name}}</span>
                    </li>
                    <!--<li>
                        <img src="images/indexbanner.png">
                        <span class="slides-cont">报名时间：2018-03-30至2018-04-08</span>
                    </li>
                    <li>
                        <img src="images/indexbanner.png">
                        <span class="slides-cont">报名时间：2018-03-30至2018-04-08</span>
                    </li>
                    <li>
                        <img src="images/indexbanner.png">
                        <span class="slides-cont">报名时间：2018-03-30至2018-04-08</span>
                    </li>-->
                </ul>
            </div>
            <div class="head_d2 am-g" style="margin-top: 2%;">

                <a href="venue.html?sportindex=0">
                    <div class="am-u-sm-3" style="text-align: center;margin: 3% 0"><img src="images/dingchang.png" alt="" class="head_img02"><span class="head_span03">订场</span></div>
                </a>
                <a href="TrainList.html">
                    <div class="am-u-sm-3" style="text-align: center;margin: 3% 0"><img src="images/xunlian.png" alt="" class="head_img02"><span class="head_span03">培训</span></div>
                </a>
                <a href="Match.html">
                    <div class="am-u-sm-3" style="text-align: center;margin: 3% 0"><img src="images/saishi.png" alt="" class="head_img02"><span class="head_span03">赛事</span></div>
                </a>
                <a href="Activity.html">
                    <div class="am-u-sm-3" style="text-align: center;margin: 3% 0"><img src="images/huodong.png" alt="" class="head_img02"><span class="head_span03">活动</span></div>
                </a>
                <a href="coach.html"><!--PrivateList-->
                    <div class="am-u-sm-3" style="text-align: center;margin: 3% 0"><img src="images/sijiao.png" alt="" class="head_img02"><span class="head_span03">教练</span></div>
                </a>
                <a href="javascript:alert('开发中')">
                    <div class="am-u-sm-3" style="text-align: center;margin: 3% 0"><img src="images/shangcheng.png" alt="" class="head_img02"><span class="head_span03">商城</span></div>
                </a>
                <a href="https://www.mszxyh.com/wapserver/outer/index.html?ChannelId=mszx02489&seq=DZZH_20180312132065&Page=index">
                    <div class="am-u-sm-3" style="text-align: center;margin: 3% 0"><img src="images/minsheng.png" alt="" class="head_img02"><span class="head_span03">民生</span></div>
                </a>
                <a href="VipCard.html">
                    <div class="am-u-sm-3" style="text-align: center;margin: 3% 0"><img src="images/huiyuan.png" alt="" class="head_img02"><span class="head_span03">会员</span></div>
                </a>
            </div>
        </div>
        <div class="line"></div>
        <div class="main">
            <div class="newactivty" style="padding-bottom: 0">
                <div class="newacty_d1">
                    <span class="newacty_sp1">近期活动</span>
                    <div class="newactyd1_d1">
                        <a href="Activity.html" style="color: #9d9d9d;"><span style="margin-right: 5%">更多</span><span class="am-icon am-icon-angle-right"></span></a>
                    </div>
                </div>
                <div data-am-widget="list_news" style="margin-bottom: 0" class="am-list-news am-list-news-default am-no-layout">
                    <div class="am-list-news-bd">
                        <ul class="am-list" style="margin-bottom: 0">
                            <li style="border-top:none;" class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left" v-for="list in ActList" v-on:click="Actclick(list.o.gId)">
                                <div class="am-u-sm-4 am-list-thumb">
                                    <a href="javascript:" v-on:click="Actclick(list.o.gId)">
                                        <img v-bind:src="list.o.faceImg">
                                    </a>
                                </div>
                                <div class=" am-u-sm-8 am-list-main">
                                    <div class="am-list-item-hd" style="    font-size: 1.4rem;">{{list.o.Name}}</div>
                                    <div class="am-list-item-text">发起方：{{list.org.Name}}</div>
                                    <div class="am-list-item-text">活动时间：{{list.startTime}}-{{list.endTime}}</div>
                                    <div class="am-list-item-text">
                                        <span class="am-badge am-round" style="background: inherit;color: #0bc886;border:1px solid #0bc886 ;">{{list.o.Tags}}</span>
                                        <span style="color: #ffa44f;"> {{list.money>0?"付费":"免费"}}</span>
                                    </div>
                                    <div class="am-list-item-text" style="float: right;margin-top: -32%">
                                        <span class="am-badge am-radius" style="background: inherit;color: #9d9d9d;border:1px solid #9d9d9d ;">{{list.state}}</span>
                                    </div>
                                    <div class="am-list-item-text" style="float: right;margin-top: -8%">
                                        {{list.count}}
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="line"></div>
            <div class="line"></div>
            <div class="line"></div>
            <div class="line"></div>
            <div class="line"></div>
            <span class="newacty_sp1" style="background: linear-gradient(to right, #15b9f9,#0695fc);z-index: 999;    margin-top: -4.5%;">周边赛事</span>
            <div class="match">

                <div class="match_d1" v-for="list in MatList" v-on:click="Matclick(list.o.gId)">
                    <img v-bind:src="list.o.faceImg" alt="" class="matchd1_img01">
                    <span style="padding: 0% 3%;color: #fff;background: #787878;font-size: 1.2rem;border-radius: 50px;position: absolute;bottom: 3%;left: 3%">{{list.state}}</span>
                    <div style="border-top-left-radius: 20px;background: rgba(0,0,0,.6);padding: 0 1% 5% 3%;color: #fff; position: absolute;bottom: -10%; right: 0;">
                        {{list.startTime}}-{{list.endTime}}
                    </div>
                </div>
            </div>

            <div class="am-list-news-ft" style="padding-bottom:15px;">
                <a class="am-list-news-more" style="color: #444;" href="Match.html">查看更多 &raquo;</a>
            </div>
        </div>
        <div data-am-widget="navbar" class="am-navbar am-cf am-navbar-default am-no-layout bottomdiv" style="border-top:1px solid #dedede">
            <ul class="am-navbar-nav am-cf am-avg-sm-4" style="background-color:#ffffff;">
                <li>
                    <a href="javascript:void(0)" class="" style="color:#0BC886">
                        <span class="fa  am-icon-home  am-icon-sm"></span>
                        <span class="am-navbar-label">首页</span>
                    </a>
                </li>
                <li>
                    <a href="venue.html" class="" style="color: #757575">
                        <span class="fa fa-futbol-o am-icon-sm"></span>
                        <span class="am-navbar-label">找场地</span>
                    </a>
                </li>
                <li>
                    <a href="usercenter.html" class="" style="color:#757575;">
                        <span class="fa fa-user am-icon-sm"></span>
                        <span class="am-navbar-label">我的</span>
                    </a>
                </li>
            </ul>
        </div>


        <div class="searchmodule">
            <div class="main">
                <div class="am-u-sm-12" style="padding: 0">
                    <div class="am-form-group am-form-icon am-form-feedback" style="margin: 0;padding: 2%;background: #f2f2f2;border-bottom: 1px solid rgb(211, 211, 211);overflow: hidden;display: flex;align-items: center">
                        <input type="text" class="am-form-field search searchint " placeholder="输入关键字" style="padding-left: 7% !important;background: #fff;" v-model="keyword">
                        <span class="am-icon-search searchicon" style="left: 4%;color: #bfbfbf;right: inherit;"></span>
                        <div class="am-u-sm-2 searchhide" style="display: flex;justify-content: center;align-items: center;background: #fff;padding: 0;position: absolute;right: 2%;font-size: 1.4rem;border-right: 1px solid #ccc;">
                            取消
                        </div>
                    </div>
                </div>
                <div class="am-u-sm-12" style="padding-top: 1%;padding-bottom: 1%;background: #fff;margin-top: 2%;" v-if="svenueList.length>0">
                    <span>场馆</span>
                    <div>
                        <div data-am-widget="list_news" style="margin-bottom: 0" class="am-list-news am-list-news-default am-no-layout">
                            <div class="am-list-news-bd">
                                <ul class="am-list" style="margin-bottom: 0">
                                    <li v-on:click="VenueInfo(venue.Id)" v-for="venue in svenueList" class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
                                        <div class="am-u-sm-4 am-list-thumb">
                                            <a href="" class="">
                                                <img v-bind:src="venue.faceImg" />
                                            </a>
                                        </div>
                                        <div class=" am-u-sm-8 am-list-main">
                                            <h3 class="am-list-item-hd">{{venue.name}}</h3>
                                            <div class="am-list-item-text">{{venue.Adress}}</div>
                                            <div class="am-list-item-text">{{venue.Phone}}</div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="am-u-sm-12" style="padding-top: 1%;padding-bottom: 1%;background: #fff;margin-top: 2%;" v-if="scoach.length>0">
                    <span>教练</span>
                    <div>
                        <div class="am-list-news-bd">
                            <ul class="am-list" style="margin-bottom: 0">
                                <li style="border-top:none;overflow: hidden;margin-bottom: 0;padding-top: 1rem;" class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left" v-for="coach in scoach" v-on:click="CoachInfo(coach.Id)">
                                    <div style="padding-right: 0" class="am-u-sm-3 am-list-thumb">
                                        <img v-bind:src="coach.faceImg" style="width: 100%;border-radius: 50%;">
                                    </div>
                                    <div class=" am-u-sm-9 am-list-main">
                                        <div class="am-list-item-hd am-g" style=" font-size: 1.7rem;margin: 4% 0;overflow: hidden">
                                            <span class="" style="display: block;float: left;font-size: 1.8rem;padding: 0">{{coach.name}}</span>
                                            <img class="am-u-sm-4" src="images/coach03.png" alt="" style="width: 25%;display: block;float: left; margin-top: 3.5%;padding: 0; margin-left: 3%;">
                                            <div class="am-u-sm-4" style="float: right;padding: 0">
                                                <img src="images/coach01.png" alt="" style="width:20%">
                                                <span style="color: #a7a7a7;font-size: 1.3rem">金牌教练</span>
                                            </div>
                                        </div>
                                        <div class="am-list-item-text">
                                            <div class="am-u-sm-7" style="padding: 0;font-size: 1.3rem">
                                                累计授课<span style="font-size: 1.7rem;"> 420</span>课时
                                            </div>
                                            <div class="am-u-sm-5" style="text-align: right;padding: 0;margin-top: 2%;">
                                                <span class="am-badge am-radius" style="color: #fff;background: #00afff;">
                                                    <img src="images/coach04.png" alt="" style="    width: 30%;  margin-top: -7%;">25
                                                </span>
                                                <span class="am-badge am-radius" style="color: #fff;background: #f6a279">健身</span>
                                            </div>
                                        </div>
                                    </div>
                                </li>

                            </ul>
                        </div>
                    </div>
                </div>
                <div class="am-u-sm-12" style="padding-top: 1%;padding-bottom: 1%;background: #fff;margin-top: 2%;" v-if="sActList.length>0">
                    <span>活动</span>
                    <div>
                        <div data-am-widget="list_news" style="margin-bottom: 0" class="am-list-news am-list-news-default am-no-layout">
                            <div class="am-list-news-bd">
                                <ul class="am-list" style="margin-bottom: 0">
                                    <li style="border-top:none;" class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left" v-for="list in sActList" v-on:click="sActclick(list.o.gId)">
                                        <div class="am-u-sm-4 am-list-thumb">
                                            <a href="javascript:" v-on:click="Actclick(list.o.gId)">
                                                <img v-bind:src="list.o.faceImg">
                                            </a>
                                        </div>
                                        <div class=" am-u-sm-8 am-list-main">
                                            <div class="am-list-item-hd" style="    font-size: 1.4rem;">{{list.o.Name}}</div>
                                            <div class="am-list-item-text">发起方：{{list.org.Name}}</div>
                                            <div class="am-list-item-text">活动时间：{{list.startTime}}-{{list.endTime}}</div>
                                            <div class="am-list-item-text">
                                                <span class="am-badge am-round" style="background: inherit;color: #0bc886;border:1px solid #0bc886 ;">{{list.o.Tags}}</span>
                                                <span style="color: #ffa44f;"> {{list.money>0?"付费":"免费"}}</span>
                                            </div>
                                            <div class="am-list-item-text" style="float: right;margin-top: -32%">
                                                <span class="am-badge am-radius" style="background: inherit;color: #9d9d9d;border:1px solid #9d9d9d ;">{{list.state}}</span>
                                            </div>
                                            <div class="am-list-item-text" style="float: right;margin-top: -8%">
                                                {{list.count}}
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="am-u-sm-12" style="padding-top: 1%;padding-bottom: 1%;background: #fff;margin-top: 2%;" v-if="sMatList.length>0">
                    <span>赛事</span>
                    <div>
                        <div data-am-widget="list_news" style="margin-bottom: 0" class="am-list-news am-list-news-default am-no-layout">
                            <div class="am-list-news-bd">
                                <ul class="am-list" style="margin-bottom: 0">
                                    <li style="border-top:none;" class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left" v-for="list in sMatList" v-on:click="Matclick(list.o.gId)">
                                        <div class="am-u-sm-4 am-list-thumb">
                                            <a href="javascript:" v-on:click="Matclick(list.o.gId)">
                                                <img v-bind:src="list.o.faceImg">
                                            </a>
                                        </div>
                                        <div class=" am-u-sm-8 am-list-main">
                                            <div class="am-list-item-hd" style="    font-size: 1.4rem;">{{list.o.Name}}</div>
                                            <div class="am-list-item-text">发起方：{{list.org.Name}}</div>
                                            <div class="am-list-item-text">活动时间：{{list.startTime}}-{{list.endTime}}</div>
                                            <div class="am-list-item-text">
                                                <span class="am-badge am-round" style="background: inherit;color: #0bc886;border:1px solid #0bc886 ;">{{list.o.Tags}}</span>
                                                <span style="color: #ffa44f;"> {{list.money>0?"付费":"免费"}}</span>
                                            </div>
                                            <div class="am-list-item-text" style="float: right;margin-top: -32%">
                                                <span class="am-badge am-radius" style="background: inherit;color: #9d9d9d;border:1px solid #9d9d9d ;">{{list.state}}</span>
                                            </div>
                                            <div class="am-list-item-text" style="float: right;margin-top: -8%">
                                                {{list.count}}
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script src="https://use.fontawesome.com/ca6b609d64.js"></script>
<script src="https://cdn.bootcss.com/jquery/1.8.3/jquery.js"></script>
<script src="js/common.js"></script>
<script src="https://cdn.bootcss.com/vue/2.5.9/vue.js"></script>
<!--<script src="https://cdn.bootcss.com/amazeui/2.7.2/js/amazeui.js"></script>-->
<!--<script>
    $(function () {
        $('.searchint').focus(function () {
            $('.searchbtn').show();
            $('.searchicon').hide();
        });
        $('.searchint').blur(function () {
            if ($('.sousuo').val().length <= 0)
            {
                $('.searchbtn').hide();
                $('.searchicon').show();
            }
        });

    })
</script>-->

</html>


<script>
    var page = new Vue({
        el: '#page',
        data: {
            keyword: '',
            ActList: [],
            MatList: [],
            keyword: '',
            sActList: [],
            sMatList: [],
            svenueList: [],
            scoach: [],
            isshow: false,
            carousel:[],
        },
        methods: {
            getInfo: function () {
                var that = this;
                $.ajax({
                    type: 'GET',
                    url: apiUrl + '/Api/Data/GetActMat',
                    success: function (data) {
                        if (data.errcode == 0) {
                            that.ActList = data.data.Act;
                            that.MatList = data.data.Mat;
                            that.carousel = data.data.carousel;
                            console.log(that.carousel);
                            $.getScript("https://cdn.bootcss.com/amazeui/2.7.2/js/amazeui.js");
                        } else {

                            alert(data.errmsg);
                        }
                    },
                    //error: function () {
                    //    alert("服务器加载异常");
                    //}
                })
            },
            Actclick: function (gid) {
                location.href = "ActivityInfo.html?gId=" + gid;
            },
            Matclick: function (gid) {
                location.href = "MatchInfo.html?gId=" + gid;
            },
            VenueInfo: function (venueid) {
                location.href = 'venuedetails.html?venueid=' + venueid;
            },
            CoachInfo: function (gId) {
                location.href = 'coach_detail.html?gId=' + gId;
            }
        },
        watch: {
            keyword: function () {
                var that = this;
                if (that.keyword.length > 0)
                {
                    $.ajax({
                        type: 'GET',
                        data: { keyword: that.keyword },
                        url: window.apiUrl + '/Api/Data/IndexSearch',
                        success: function (data) {
                            if (data.errcode == 0) {
                                that.svenueList = data.data.venueList;
                                that.sActList = data.data.Act;
                                that.sMatList = data.data.Mat;
                                that.scoach = data.data.coach;

                            } else {
                                alert(data.errmsg);
                            }
                        }
                    })
                }
            }
        }
    })
    $(function () {
        page.getInfo();
    })
</script>
<script>
    $('.searchIcon').click(function () {
        page.isshow = true;
        $('.searchmodule').show();
    });
    $('.searchhide').click(function () {
        page.isshow = false;
        $('.searchmodule').hide();
    });
</script>